package me.sunpeng.design.builder.improve;

/**
 * @author sp
 */
public class Client {
    public static void main(String[] args) {
        //盖普通房子
        CommonHouse commonHouse = new CommonHouse();
        //准备创建房子的指挥者
        HouseDirector houseDirector = new HouseDirector(commonHouse);
        //完成盖房，返回房子
        House house = houseDirector.constructHouse();

        //盖高楼
        HighHouse highHouse = new HighHouse();
        //重置建造者
        houseDirector.setHouseBuilder(highHouse);
        //完成盖房，高楼
        House house1 = houseDirector.constructHouse();

    }
}
